<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge">
  	<%@ include file="/common/ssb/include/common-base.jsp"%>
    <title>文章内容编辑-iframe窗体</title>
	<script type="text/javascript" charset="utf-8" src="${ctx}/js/ueditor/ueditor.config.pagedit.js"></script>
	<script type="text/javascript" charset="utf-8" src="${ctx}/js/ueditor/ueditor.all.js"> </script>
	<script type="text/javascript" src="${ctx}/js/ueditor/lang/zh-cn/zh-cn.js" ></script>
  </head>
  <body>
<div class="content22" style="border:1px #f0f0f0 solid;">
	   <div class="form-group">
	       	<textarea id="content" style="width:0%;height:0px;display:none;" name="content"></textarea>
	    	<script id="editorId" type="text/plain"  style="width:100%;height:290px;"></script>
	   </div>
</div>
</body>
  <script type="text/javascript">
	  localStorage.setItem("file_directory",sysName);
	  var type="${param.type}";
	  var formidNm="${param.formid}";
	  //var perviewDivObj = parent.document.getElementById(formidNm+"_content_remark");//parent.thisCtrTable;
	  var ue = UE.getEditor("editorId");//初始化对象
	  ue.ready(function() {//编辑器初始化后完成再赋值
		  /*if(!strUtil.isNull(perviewDivObj.html())){
			  var varData = perviewDivObj.html().replace("&nbsp;","");
			  varData =varData.replace("&lt;","<").replace("&gt;",">");
			  ue.setContent(varData);
		  }*/
	  });
	  function setEditContent(val) {
	  	ue.setContent(val);
	  }
	  function saveDesign(formId){
		  var textContent =UE.getEditor("editorId").getContent();
		  var obj = {};
		  obj.content=textContent;
		  parent.preDisplayFormContent(obj,type,formId);
	  }

  </script>
</html>
